package com.ctsi.security;

import com.ctsi.commons.util.UtilValidate;
import com.ctsi.security.exception.ParamNotValideException;

public class SecurityUtil {
	public static String getActionFromPermId(String permissionId){
		String result=null;
       if(UtilValidate.isNotEmpty(permissionId)){
    	   if(permissionId.indexOf("-")!=-1){
    		   result=permissionId.substring(permissionId.lastIndexOf("-")+1);
    	   }else{
    		   throw new ParamNotValideException(permissionId+":  功能ID不合法，必须以-把功能类型与功能操作分开！");
    	   }
       }
       return result;
	}

}
